package com.nf.ch03.test05.demo02;

/**
 * 老师
 *
 * @author lwj
 * @date 2025-03-03
 * @vesion 1.0.0
 */
public class Teacher {
    private String name;
    private String school;

    public Teacher() {
    }
    public Teacher(String name, String school) {
        this.name = name;
        this.school = school;
    }

    // 属性
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    /**
     * 授课
     */
    public void teach(){
        System.out.println("讲课");
    }

    public void jieShao(){
        System.out.println("大家好，我是Java老师");
    }
}
